/*
 * $Id: PerforcePerspectiveFactory.java 23 2002-09-29 13:59:30Z bpruessmann $
 * 
 * Copyright (c) 2001 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 */
package net.sourceforge.p4eclipse.ui;

import net.sourceforge.p4eclipse.ui.views.PendingChangelistView;
import net.sourceforge.p4eclipse.ui.views.SubmittedChangelistView;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

/**
  * Factory for creating Perforce perspectives.
  * 
  * @version	$Revision: 23 $
  * @author		<a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public class PerforcePerspectiveFactory implements IPerspectiveFactory
{
	/*
	 * @see IPerspectiveFactory#createInitialLayout(IPageLayout)
	 */
	public void createInitialLayout(IPageLayout layout)
	{
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);

		IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea); //$NON-NLS-1$
		bottom.addView(ConsoleView.ID);

		IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.70f, editorArea); //$NON-NLS-1$
		left.addView(DepotView.ID);	
		
		IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, 0.30f, editorArea); //$NON-NLS-1$
		right.addView(PendingChangelistView.ID);		
		right.addView(SubmittedChangelistView.ID);		
	}

}
